import { NgModule } from '@angular/core'

import { SharedModule } from '@shared'
import { GroupRoutingModule } from './group-routing.module'
import { GroupListComponent } from './list/list.component'
import { GroupService } from './group.service'
import { GroupAlinterService } from './group-alinter.service'
import { GroupNewComponent } from './new/new.component'
import { GroupNewBaseComponent } from './new/base/base.component'
import { GroupNewUserComponent } from './new/user/user.component'
import { GroupStoreService } from './new/group-store.service'
import { GroupDetailComponent } from './detail/detail.component'
import { GroupDetailTabMerchantsComponent } from './detail/tab-merchants/tab-merchants.component'
import { GroupDetailTabSysteminfosComponent } from './detail/tab-systeminfos/tab-systeminfos.component'
import { GroupDetailTabUserlistComponent } from './detail/tab-userlist/tab-userlist.component'

const COMPONENTS = [
  GroupListComponent,
]
const COMPONENTS_NOROUNT = [
  GroupNewComponent,
  GroupNewBaseComponent,
  GroupDetailComponent,
  GroupNewUserComponent,
  GroupDetailTabMerchantsComponent,
  GroupDetailTabSysteminfosComponent,
  GroupDetailTabUserlistComponent,
]

@NgModule({
  imports: [
    SharedModule,
    GroupRoutingModule
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    { provide: GroupService, useClass: GroupAlinterService },
    GroupStoreService,
  ]
})
export class GroupModule { }
